package com.hb.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class HbException extends RuntimeException {

    private int code;
    private String msg;

    public HbException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public HbException(HbExcetionEnum hbExcetionEnum) {
        this.code = hbExcetionEnum.getCode();
        this.msg = hbExcetionEnum.getMsg();
    }

}
